package com.maixy.studyonlineapi.es.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @ClassName ActivityEs
 * @Description TODO
 * @Date 2021/9/20 18:57
 * @Author maixy
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Document(indexName = "activity", shards = 3, replicas = 1)
public class ActivityEs {
    /**
     * 唯一标识
     */
    @Id
    private Long id;

    @Field(type = FieldType.Long, index = false)
    private Long createBy;

    @Field(type = FieldType.Long, index = false)
    private Long createTime;

    @Field(type = FieldType.Long, index = false)
    private Long updateBy;

    @Field(type = FieldType.Long, index = false)
    private Long updateTime;

    @Field(type = FieldType.Boolean, index = false)
    private Boolean hasDelete;

    @Field(type = FieldType.Text)
    private String activityName;

    @Field(type = FieldType.Integer)
    private Integer activityType;

    @Field(type = FieldType.Long, index = false)
    private Long activityLogoId;

    @Field(type = FieldType.Text)
    private String activityDesc;
}
